
#被动技能【浪客之道】
execute as @a[tag=yasuo,scores={skRunDistance=5000..,skHealth=..4}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/beidong
execute as @a[tag=yasuo,scores={skRunDistance=5000..,skShouShang1=40..}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/beidong
execute at @a[tag=yasuo,scores={skRunDistance=5000..}] run particle minecraft:bubble ~ ~0.8 ~ 0.3 0.5 0.3 0.01 2
execute at @a[tag=yasuo,scores={skRunDistance=5000..}] run particle minecraft:bubble ~ ~0.8 ~ 0.3 0.5 0.3 0.01 5
scoreboard players reset @a[tag=yasuo,scores={skShouShang1=40..}] skShouShang1

#被动技能【剑意】
execute as @a[tag=yasuo,scores={skShangHai=30..}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/jianyi
scoreboard players reset @a[tag=yasuo,scores={skShangHai=30..}] skShangHai
execute as @a[tag=yasuo,scores={skRunDistance=5000..}] run scoreboard players set @s skRunDistance 5000

#主动技能【踏前斩】玩家-1  实体不多于3
scoreboard players set @a[scores={yasuo3=0}] yasuo3 -1
scoreboard players set @e[type=!player,scores={yasuo3=4..}] yasuo3 4
#主动技能【踏前斩】
execute as @a[tag=yasuo,scores={skIron_sword1=1..}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/taqianzhan
#主动技能【踏前斩】CD
execute as @a[tag=yasuo,scores={skCDJPG=0}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/jinengcd3



#主动技能【斩钢闪】二段：旋风烈斩：改变箭
execute as @a[tag=yasuo,scores={skPlayer=2,skCrossBow1=1..}] at @s positioned ^ ^ ^3 as @e[type=arrow,distance=0..4] run data merge entity @s {NoGravity:1b,damage:1}
execute as @a[tag=yasuo,scores={skPlayer=2,skCrossBow1=1..}] at @s positioned ^ ^ ^3 as @e[type=arrow,distance=0..4] run tag @s add XFArrow
#主动技能【斩钢闪】二段：远程旋风
execute as @a[tag=yasuo,scores={skPlayer=2,skCrossBow1=1..}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/xuanfeng
#主动技能【斩钢闪】二段：远程旋风 特效&效果
execute as @e[type=arrow,tag=XFArrow] at @s run particle minecraft:effect ~ ~0.3 ~ 1 2 1 0.01 50 normal @a
execute as @e[type=arrow,tag=XFArrow] at @s run effect give @e[tag=!yasuo,distance=0.1..5] minecraft:levitation 1 0 true
execute at @e[type=arrow,tag=XFArrow] as @e[distance=0.1..3,tag=!yasuo] at @s run tp @s ~ ~6 ~
#主动技能【斩钢闪】三段：旋风烈斩
execute as @a[tag=yasuo,scores={skPlayer=2,Diamond_sword1=1..}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/xuanfengliezhan
#主动技能【斩钢闪】一段：默认斩钢闪
execute as @a[tag=yasuo,scores={Diamond_sword1=1..}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/zhangangshan
#主动技能【斩钢闪】冷却完成
execute as @a[tag=yasuo,scores={skCDPearl=0}] run function nw:yingxiong/1yingxiong/06yasuo/skill/jinengcd1



#主动技能【风之屏障】
execute as @a[tag=yasuo,scores={skEgg=1..}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/fengzhipingzhang
#主动技能【风之屏障】CD
execute as @a[tag=yasuo,scores={skCDEgg=0}] run function nw:yingxiong/1yingxiong/06yasuo/skill/jinengcd4

#主动技能【狂风绝息斩】
execute if entity @a[tag=BossAlready] as @a[tag=yasuo,scores={skEXBottle=1..}] at @s as @p[team=King,distance=0.1..15,gamemode=!spectator] at @s if block ~ ~-1 ~ #air if block ~ ~-1.5 ~ #air if block ~ ~-2 ~ #air run effect give @s slow_falling 2 0 true
execute if entity @a[tag=BossAlready] as @a[tag=yasuo,scores={skEXBottle=1..}] at @s as @p[team=King,distance=0.1..15,gamemode=!spectator] at @s if block ~ ~-1 ~ #air if block ~ ~-1.5 ~ #air if block ~ ~-2 ~ #air run scoreboard players set @s EFLock 40

execute unless entity @a[tag=BossAlready] as @a[tag=yasuo,scores={skEXBottle=1..}] at @s as @p[distance=0.1..15,gamemode=!spectator] at @s if block ~ ~-1 ~ #air if block ~ ~-1.5 ~ #air if block ~ ~-2 ~ #air run effect give @s slow_falling 2 0 true
execute unless entity @a[tag=BossAlready] as @a[tag=yasuo,scores={skEXBottle=1..}] at @s as @p[distance=0.1..15,gamemode=!spectator] at @s if block ~ ~-1 ~ #air if block ~ ~-1.5 ~ #air if block ~ ~-2 ~ #air run scoreboard players set @s EFLock 40

execute if entity @a[tag=BossAlready] as @a[tag=yasuo,scores={skEXBottle=1..}] at @s at @a[team=King,distance=0.1..15,gamemode=!spectator] if block ~ ~-1 ~ #air if block ~ ~-1.5 ~ #air if block ~ ~-2 ~ #air at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/kuangfeng
execute unless entity @a[tag=BossAlready] as @a[tag=yasuo,scores={skEXBottle=1..}] at @s at @p[distance=0.1..15,gamemode=!spectator] if block ~ ~-1 ~ #air if block ~ ~-1.5 ~ #air if block ~ ~-2 ~ #air at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/kuangfeng




#主动技能【狂风绝息斩】效果
execute at @e[type=armor_stand,tag=yasuo1] run tp @p[tag=yasuo] ~ ~0.5 ~ facing entity @p[distance=1..,limit=1,sort=nearest] feet
#主动技能【狂风绝息斩】CD
execute as @a[tag=yasuo,scores={skCDEXBottle=0}] at @s run function nw:yingxiong/1yingxiong/06yasuo/skill/jinengcd2

#主动技能【旋风烈斩已就绪】特效
execute at @a[tag=yasuo,scores={skPlayer=2}] run particle minecraft:effect ~ ~0.3 ~ 0.4 0.3 0.4 0.01 3 normal @a
#主动技能【风之屏障】特效
execute as @e[type=armor_stand,tag=yasuo] at @s run tp ^ ^ ^0.08
execute at @e[type=armor_stand,tag=yasuo] run particle minecraft:cloud ^ ^4 ^-0.8 0.1 0.1 0.1 0.06 1 normal @a
execute at @e[type=armor_stand,tag=yasuo] run particle minecraft:cloud ^ ^2.5 ^-0.4 0.1 0.1 0.1 0.06 1 normal @a
execute at @e[type=armor_stand,tag=yasuo] run particle minecraft:cloud ~ ~1 ~ 0.1 0.1 0.1 0.06 1 normal @a
execute at @e[type=armor_stand,tag=yasuo] run particle minecraft:cloud ~ ~-0.5 ~ 0.1 0.1 0.1 0.06 1 normal @a
execute at @e[type=armor_stand,tag=yasuo] run particle minecraft:cloud ~ ~-2 ~ 0.1 0.1 0.1 0.06 1 normal @a

execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~2 ~ run kill @e[type=arrow,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~2 ~ run kill @e[type=ender_pearl,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~2 ~ run kill @e[type=snowball,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~2 ~ run kill @e[type=fireball,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~2 ~ run kill @e[type=spectral_arrow,distance=0..3]

execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~4 ~ run kill @e[type=arrow,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~4 ~ run kill @e[type=ender_pearl,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~4 ~ run kill @e[type=snowball,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~4 ~ run kill @e[type=fireball,distance=0..3]
execute at @e[type=armor_stand,tag=yasuo] positioned ~ ~4 ~ run kill @e[type=spectral_arrow,distance=0..3]


#主动技能【风之屏障】计时结束
kill @e[type=armor_stand,tag=yasuo,scores={skCDEntity=7..}]
#主动技能【狂风绝息斩】计时结束
kill @e[type=armor_stand,tag=yasuo1,scores={skCDEntity=2..}]
kill @e[type=armor_stand,tag=yasuo2,scores={skCDEntity=2..}]
#主动技能【XFArrow】12格内没有亚索清除 & 2s后清除
kill @e[type=arrow,tag=XFArrow,scores={skCDEntity=15..}]


execute as @a[tag=yasuo] run title @s actionbar [{"text":"斩钢闪","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDPearl","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 风之屏障","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEgg","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 狂风绝息斩","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEXBottle","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 剑意 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skRunDistance","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"5000","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
